{extend name="index_base" /}
      {block name="seo"}
        <title>充值|{$site_config['site_title']}|{$site_config['seo_title']}</title>
  
  
  <meta name="keywords" content="{$site_config['seo_keyword']}">
  <meta name="description" content="{$site_config['seo_description']}">
      {/block}
{block name="body"}
<div class="main layui-clear">
  <div class="fly-panel" pad20>   

    <div class="layui-form layui-form-pane">
      <form method="post"  >

		<div class="layui-form-item">
     
          <label for="L_title" class="layui-form-label">充值金额</label>
          <div class="layui-input-inline">
            <input type="number" name="jiage" id="czjiage"  required lay-verify="required"  autocomplete="off" class="layui-input">
          </div>
      
           <div class="layui-form-mid layui-word-aux">最少充值{$config['minnum']}元</div>
        
        </div>
     <div class="layui-form-item">
          <label for="L_title" class="layui-form-label">积分</label>
          <div class="layui-input-inline">
            <input type="number" name="score" id="czscore" disabled class="layui-input">
          </div>
        </div>
        <div class="layui-form-item">
          <button class="layui-btn"  lay-submit="" lay-filter="forum_add">确认支付</button>
          <button onclick="history.go(-1);" class="layui-btn layui-btn-primary ">返回</button>
        </div>
      </form>
    </div>
  </div>
</div>
{/block}
{block name="script"}
<script>


layui.use('form', function(){
  var form = layui.form()
  ,jq = layui.jquery;
  
  var scorenum="{$config['scorenum']}";
  jq('#czjiage').on('focusout',function(){
	  
	var jiage=jq(this).val();
	var	score=jiage*scorenum;
		  jq('#czscore').val(score);
	
  });
 
 var url="{:addons_url('alipay://Alipay/paysubmit')}";

  form.on('submit(forum_add)', function(data){
  
 
    var param = data.field;

    jq.post(url,param,function(data){
    	
      if(data.code == 1){
    	  layer.msg(data.msg, {icon: 1, anim: 6, time: 1000},function(){
    		  
    		  jq('.main').append(data.url);
    		  
    	  });
    	
    	 
    
    	  
      }else{
     
        layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
      }
    });  
    return false;
  });

})
</script>
{/block}